package com.data.modules.online.controller;

import com.alibaba.fastjson.JSONObject;
import java.util.List;
import java.util.Map;

import com.data.common.online.api.IOnlineBaseExtAPI;
import com.data.common.system.base.controller.BootController;
import com.data.common.system.vo.DictModel;
import com.data.modules.online.cgform.service.impl.OnlineBaseExtAPI;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@Api(tags="onlineBaseExtAPIController")
@RequestMapping({"/online/api"})
@RestController
public class OnlineBaseExtAPIController  {
    @Autowired
    OnlineBaseExtAPI onlineBaseExtAPI;


    @PostMapping({"/cgform/crazyForm/{name}"})
    public String mo97a(@PathVariable("name") String str, @RequestBody JSONObject jSONObject) throws Exception {
        return this.onlineBaseExtAPI.cgformPostCrazyForm(str, jSONObject);
    }


    @PutMapping({"/cgform/crazyForm/{name}"})
    public String mo100b(@PathVariable("name") String str, @RequestBody JSONObject jSONObject) throws Exception {
        return this.onlineBaseExtAPI.cgformPutCrazyForm(str, jSONObject);
    }


    @GetMapping({"/cgform/queryAllDataByTableName"})
    public JSONObject mo96a(@RequestParam("tableName") String str, @RequestParam("dataIds") String str2) {
        return this.onlineBaseExtAPI.cgformQueryAllDataByTableName(str, str2);
    }


    @DeleteMapping({"/cgform/cgformDeleteDataByCode"})
    public String mo101b(@RequestParam("cgformCode") String str, @RequestParam("dataIds") String str2) {
        return this.onlineBaseExtAPI.cgformDeleteDataByCode(str, str2);
    }


    @GetMapping({"/cgreportGetData"})
    public Map<String, Object> mo99a(@RequestParam("code") String str, @RequestParam("forceKey") String str2, @RequestParam("dataList") String str3) {
        return this.onlineBaseExtAPI.cgreportGetData(str, str2, str3);
    }


    @GetMapping({"/cgreportGetDataPackage"})
    public List<DictModel> mo98a(@RequestParam("code") String str, @RequestParam("dictText") String str2, @RequestParam("dictCode") String str3, @RequestParam("dataList") String str4) {
        return this.onlineBaseExtAPI.cgreportGetDataPackage(str, str2, str3, str4);
    }
}
